\hypertarget{classec_1_1SingleQueue}{\section{ec\-:\-:Single\-Queue$<$ T $>$ Class Template Reference}
\label{classec_1_1SingleQueue}\index{ec\-::\-Single\-Queue$<$ T $>$@{ec\-::\-Single\-Queue$<$ T $>$}}
}


单循环队列  




{\ttfamily \#include $<$single\-Queue.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classec_1_1SingleQueue_a7b00a1ab2f2731190a7bddf3ea85e2c2}{Single\-Queue} (uint32\-\_\-t capacity)
\begin{DoxyCompactList}\small\item\em 构造函数 \end{DoxyCompactList}\item 
void \hyperlink{classec_1_1SingleQueue_ad3ff61a80782a76971cd688e00e7eae8}{push} (T value)
\item 
void \hyperlink{classec_1_1SingleQueue_a3e4efdff7d19761ad7b3c05321e02520}{pop} ()
\item 
bool \hyperlink{classec_1_1SingleQueue_a6380454a9d7588d715884e85e3be7312}{empty} ()
\item 
bool \hyperlink{classec_1_1SingleQueue_ae3a2bb25e2a83b3a09dcacac84de1fb1}{full} ()
\item 
uint32\-\_\-t \hyperlink{classec_1_1SingleQueue_a71623b32e70dd0e53f8413c7b43bf7ca}{count} ()
\item 
T \& \hyperlink{classec_1_1SingleQueue_ace5fffd93a3eaed17ce545b17925813f}{front} ()
\item 
T \& \hyperlink{classec_1_1SingleQueue_a55e2ac6df57ba91c264955685adb94a0}{rear} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename T$>$class ec\-::\-Single\-Queue$<$ T $>$}

单循环队列 

一个线程写入，另一线程读取是安全的 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classec_1_1SingleQueue_a7b00a1ab2f2731190a7bddf3ea85e2c2}{\index{ec\-::\-Single\-Queue@{ec\-::\-Single\-Queue}!Single\-Queue@{Single\-Queue}}
\index{Single\-Queue@{Single\-Queue}!ec::SingleQueue@{ec\-::\-Single\-Queue}}
\subsubsection[{Single\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ {\bf ec\-::\-Single\-Queue}$<$ T $>$\-::{\bf Single\-Queue} (
\begin{DoxyParamCaption}
\item[{uint32\-\_\-t}]{capacity}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1SingleQueue_a7b00a1ab2f2731190a7bddf3ea85e2c2}


构造函数 


\begin{DoxyParams}{Parameters}
{\em capacity} & 队列容量 \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classec_1_1SingleQueue_a71623b32e70dd0e53f8413c7b43bf7ca}{\index{ec\-::\-Single\-Queue@{ec\-::\-Single\-Queue}!count@{count}}
\index{count@{count}!ec::SingleQueue@{ec\-::\-Single\-Queue}}
\subsubsection[{count}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ uint32\-\_\-t {\bf ec\-::\-Single\-Queue}$<$ T $>$\-::count (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1SingleQueue_a71623b32e70dd0e53f8413c7b43bf7ca}
获取元素数量 \hypertarget{classec_1_1SingleQueue_a6380454a9d7588d715884e85e3be7312}{\index{ec\-::\-Single\-Queue@{ec\-::\-Single\-Queue}!empty@{empty}}
\index{empty@{empty}!ec::SingleQueue@{ec\-::\-Single\-Queue}}
\subsubsection[{empty}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ bool {\bf ec\-::\-Single\-Queue}$<$ T $>$\-::empty (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1SingleQueue_a6380454a9d7588d715884e85e3be7312}
是否为空 \hypertarget{classec_1_1SingleQueue_ace5fffd93a3eaed17ce545b17925813f}{\index{ec\-::\-Single\-Queue@{ec\-::\-Single\-Queue}!front@{front}}
\index{front@{front}!ec::SingleQueue@{ec\-::\-Single\-Queue}}
\subsubsection[{front}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ T\& {\bf ec\-::\-Single\-Queue}$<$ T $>$\-::front (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1SingleQueue_ace5fffd93a3eaed17ce545b17925813f}
获取对头元素 \hypertarget{classec_1_1SingleQueue_ae3a2bb25e2a83b3a09dcacac84de1fb1}{\index{ec\-::\-Single\-Queue@{ec\-::\-Single\-Queue}!full@{full}}
\index{full@{full}!ec::SingleQueue@{ec\-::\-Single\-Queue}}
\subsubsection[{full}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ bool {\bf ec\-::\-Single\-Queue}$<$ T $>$\-::full (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1SingleQueue_ae3a2bb25e2a83b3a09dcacac84de1fb1}
是否已满 \hypertarget{classec_1_1SingleQueue_a3e4efdff7d19761ad7b3c05321e02520}{\index{ec\-::\-Single\-Queue@{ec\-::\-Single\-Queue}!pop@{pop}}
\index{pop@{pop}!ec::SingleQueue@{ec\-::\-Single\-Queue}}
\subsubsection[{pop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf ec\-::\-Single\-Queue}$<$ T $>$\-::pop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1SingleQueue_a3e4efdff7d19761ad7b3c05321e02520}
移除队头元素 \hypertarget{classec_1_1SingleQueue_ad3ff61a80782a76971cd688e00e7eae8}{\index{ec\-::\-Single\-Queue@{ec\-::\-Single\-Queue}!push@{push}}
\index{push@{push}!ec::SingleQueue@{ec\-::\-Single\-Queue}}
\subsubsection[{push}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf ec\-::\-Single\-Queue}$<$ T $>$\-::push (
\begin{DoxyParamCaption}
\item[{T}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1SingleQueue_ad3ff61a80782a76971cd688e00e7eae8}
加一个元素到队尾 \hypertarget{classec_1_1SingleQueue_a55e2ac6df57ba91c264955685adb94a0}{\index{ec\-::\-Single\-Queue@{ec\-::\-Single\-Queue}!rear@{rear}}
\index{rear@{rear}!ec::SingleQueue@{ec\-::\-Single\-Queue}}
\subsubsection[{rear}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ T\& {\bf ec\-::\-Single\-Queue}$<$ T $>$\-::rear (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1SingleQueue_a55e2ac6df57ba91c264955685adb94a0}
获取队尾元素 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
include/ec/single\-Queue.\-h\end{DoxyCompactItemize}
